﻿@model Alumnos.Models.Materia

@{
    ViewBag.Title = "Editar materia";
}

<h1>Editar materia</h1>
<div>
    <form method="post" action="@Url.Action("Editar", "Materia")">
        <div class="form-group">
            @Html.LabelFor(x=>x.Id)
            @Html.TextBoxFor(x => x.Id, new { @readonly="readonly", @class="form-control" })
        </div>
        <div class="form-group @(Html.ViewData.ModelState.IsValidField("nombre") ? null : "has-error" )">
            @Html.LabelFor(x => x.Nombre)
            @Html.TextBoxFor(x => x.Nombre, new { @class="form-control" })
            @Html.ValidationMessageFor(x => x.Nombre, null, new { @class="help-block" })
        </div>
        <div>
            <input type="submit" value="Modificar" class="btn btn-primary" />
        </div>
    </form>
</div>
